import request from '@/utils/request'
import qs from 'qs'
export function addAllRole(params) {
  return request({
    url: '/role/save',
    method: 'post',
    data: qs.stringify(params)
  })
}

export function searchRole(params) {
  return request({
    url: '/sysLog/input',
    method: 'post',
    data: qs.stringify(params)
  })
}
// export function queryAllAuth() {
//   return request({
//     url: '/role/queryAllAuth',
//     method: 'post'
//     // headers: { 'userToken': '1add399a6ae211e88576408d5c07f6f8' }
//   })
// }
export function roleList(params) {
  return request({
    url: '/role/list',
    method: 'post',
    data: qs.stringify(params)
  })
}
export function delRole(params) {
  return request({
    url: '/role/delete',
    method: 'post',
    data: qs.stringify(params)
  })
}
export function authRole(params) {
  return request({
    url: '/role/auth',
    method: 'post',
    data: qs.stringify(params)
  })
}
export function queryAllAuth(params) {
  return request({
    url: '/role/queryAllAuth',
    method: 'post',
    data: qs.stringify(params)
  })
}
export function queryroleAuth(params) {
  return request({
    url: '/role/queryById',
    method: 'post',
    data: qs.stringify(params)
  })
}
